using UnityEngine;
using UnityEngine.UI;

public class CoinModify : MonoBehaviour
{
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if(collision.gameObject.GetComponent<Player>()!=null)
        {
            collision.gameObject.GetComponent<Player>().StopPlayer();
            PanelManager.Open<CoinBuyTip>(transform.Find("Text").GetComponent<Text>().text, transform.parent.GetComponent<ItemModify>());
        }
    }
}
